<?php
namespace app\index\validate;

use think\Validate;

class User extends Validate
{
    protected $rule = [
        'phone'  => 'require|max:11|/^1[3-8]{1}[0-9]{9}$/',
        'pw'   => 'require|min:6',
        'pw1'   => 'require|confirm:pw',
    ];
    protected $message = [
        'phone' =>'请输入手机号码|手机好号码最多不能超过11位|手机号码格式不正确',
        'pw.require'     => '请输入密码',
        'pw.min'     => '密码不能少于6位',
        'pw1'     => '密码不一致',
    ];

}